package app

import (
	"fmt"

	"github.com/spf13/cobra"
)

// App is kek-registry base applicable object.
type App struct {
	cmd *cobra.Command
}

// Register returns configured cobra.Command object as CLI entrypoint.
func (a *App) Register() *cobra.Command {
	return a.cmd
}

// New creates an App and initializes it.
func New() *App {
	app := &App{}
	cmd := &cobra.Command{
		Use:  "kek-registry",
		RunE: app.Run,
	}
	app.cmd = cmd
	return app
}

func (a *App) Run(_ *cobra.Command, _ []string) (err error) {
	fmt.Printf("registry\n")

	return
}
